{{- $profile := .Params.profile -}}
{{- if not $profile -}}
  {{- $profile = site.Params.profile -}}
{{- end -}}

{{- with $profile -}}
{{- if eq .enable true -}}
<section class="article author">
  {{- with .avatar -}}<img class="avatar" src="{{- . | relURL -}}" alt>{{- end -}}
  
  {{- with .name -}}<p class="name">{{- . -}}</p>{{- end -}}
  
  {{- with .bio -}}<div class="bio">{{- . | markdownify -}}</div>{{- end -}}

  <div class="details">
    {{- with .douban -}}
      <a class="item" href="https://www.douban.com/people/daliu" target="_blank"><span class="iconfont icon-douban"></span>&nbsp;douban</a>
    {{- end -}}

    {{- with .github -}}
      <a class="item" href="https://github.com/{{- . | safeHTML -}}" target="_blank"><span class="iconfont icon-github"></span>&nbsp;github</a>
    {{- end -}}

    {{- with .docker -}}
      <a class="item" href="https://hub.docker.com/u/{{- . | safeHTML -}}" target="_blank"><span class="iconfont icon-docker"></span>&nbsp;docker</a>
    {{- end -}}

    {{- with .twitter -}}
      <a class="item" href="https://twitter.com/{{- . | safeHTML -}}" target="_blank"><span class="iconfont icon-twitter"></span>&nbsp;twitter</a>
    {{- end -}}

    {{- with .spotify -}}
      <a class="item" href="https://open.spotify.com/user/liuwentao" target="_blank"><span class="iconfont icon-spotify"></span>&nbsp;Spotify</a>
    {{- end -}}
    <!-- <a class="item" href="http://fanfou.com/daliu" target="_blank"><span class="iconfont icon-fanfou"></span>@饭否</a> -->
    {{- with .telegram -}}
    <a class="item" href="https://t.me/liuwentao" target="_blank"><span class="iconfont icon-telegram"></span>&nbsp;telegram</a>
   {{- end -}}
    {{- with .email -}}
      <a class="item" href="mailto:{{- . | safeHTML -}}" target="_blank"><span class="iconfont icon-email"></span>&nbsp;{{- . -}}</a>
    {{- end -}}
  </div>
</section>
{{- end -}}
{{- end -}}